package com.itheima.Aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class AccountAdvice {
    @Pointcut("execution(* com.itheima.service.*.transfer(..))")
    private void pt(){}

    @Around("AccountAdvice.pt()")
    public Object circulation(ProceedingJoinPoint pjp) throws Throwable {
        for (int i = 0; i < 5; i++) {
            Object proceed = pjp.proceed();
        }
        return null;
    }
}
